package com.cw1.builder.improveMethod2;


/**
 * @Author qiuMi
 * @description 房子 - 客户
 * @Date 2022-10-20 22:40
 **/
public class Client {
    public static void main(String[] args) {
        /**
         * house 实现接口并重写方法
         * 在 houseDirector 中重写构建过程并返回 house
         */

        // 创建普通房子
        CommonHouse commonHouse = new CommonHouse();
        HouseDirector houseDirector = new HouseDirector(commonHouse);
        houseDirector.createHouse();

        // 创建高楼
        HighHouse highHouse = new HighHouse();
        houseDirector.setHouseBuilder(highHouse);
        houseDirector.createHouse();
    }
}
